#include <iostream>
#include <vector>
using namespace std;

class Solution
{
public:
    int maxIncreasingSubarrays(vector<int> &nums)
    {
        int k = 0;
        int increasingCount = 1;
        int lastIncreasingCount = 0;
        for (int i = 1; i < nums.size(); i++)
        {
            if (nums[i] > nums[i - 1])
            {
                increasingCount++;
                k = max(k, max(min(lastIncreasingCount, increasingCount), increasingCount / 2));
            }
            else
            {
                if (increasingCount == 1)
                    lastIncreasingCount = 0;
                lastIncreasingCount = increasingCount;
                increasingCount = 1;
            }
        }
        return max(k, 1);
    }
};

int main()
{
    cout << "Code3350" << endl;
    Solution s;
    cout << s.maxIncreasingSubarrays(vector<int>{5, 8, -2, -1}) << endl;
    return 0;
}